#!/bin/bash

read -p "请输入第一个数" num1
read -p "请输入第二个数" num2

NUM1=$num1
NUM2=$num2

if [[ $num1 =~ ^-?[0-9]+$ ]]; then
    num1="${num1}.0"
fi
if [[ $num2 =~ ^-?[0-9]+$ ]]; then
    num2="${num2}.0"
fi


# 使用 [[ ]] 比较两数大小
if [[ "$num1" > "$num2" ]]; then	
    echo "$NUM1 > $NUM2"
elif [[ "$num1" < "$num2" ]]; then
    echo "$NUM1 < $NUM2"
else
    echo "$NUM1 = $NUM2"
fi
